//获取DOM---------------------------------------------------------------------
var getClassDom = function(nodeClassName){
    return document.querySelector(".nodeClassname");
}
var getIdDom = function(nodeIdName){
    return document.querySelector("#nodeIdname");
}
//从下方下弹出的滑层----------------------------------------------------------------
var slider = document.querySelector(".slider");
var mask = document.querySelector(".mask");
//滑层上滑

var sliderUp=function(){
    mask.style.display="block";
    slider.style.transform="translate(0,0)"; 
}
//滑层下滑
var sliderDown=function(){
    mask.style.display="none";
    slider.style.transform="translate(0,100%)";
}

//----------------------------------------------------------------------------------

//确认框弹出和关闭
var confirm_box = document.querySelector(".confirm-box");

var confirm_open = function(){
    confirm_box.classList.toggle("confirm-open");
    confirm_box.classList.toggle("confirm-close",false);
    mask.style.display="block";
}
var confirm_close = function(){
    confirm_box.classList.toggle("confirm-close");
    confirm_box.classList.toggle("confirm-open",false);
    mask.style.display="none";
}

//弹出消息框---------------------------------------------------------------
var msg_box = document.querySelector(".msg-box");
var msg_text = document.querySelector(".msg-text");
var img = document.querySelector(".img");
var msg_box_open = function(callback){  
    
        msg_box.style.display="block";
        
        callback();
   
    
}
var msg_box_close = function(){
     setTimeout(function(){
        msg_box.style.display="none";
    },2000)
}

//获取验证码点击效果-----------------------------------------------------------

var isClick = false;
var getYzm = function(node){
    
   var t = 60;
   if(isClick==false){
    isClick = true;
    var timer = setInterval(function(){
        if(t!=0){
             t--;
            node.innerHTML = "剩余<span>"+t+"</span>秒";
        }else{
            node.innerText = "重新发送";
            clearInterval(timer);
            isClick = false;
        }
       
    },1000)
   }
   
}

//返回按钮--------------------------------------------------------------------------



var goBack = function(){
    history.go(-1);
}